package com.hq.fxh.No1_Infromation.Infor.Adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import com.hq.fxh.No0_ChengQu.Fragment.HomeFragment;
import com.hq.fxh.No1_Infromation.Infor.Fragment.Fragment_infor;
import com.hq.fxh.No1_Infromation.Video.Fragment.VideoFragment;

/**
 * /**
 *
 * @author 薛
 * @ClassName
 * @Description :
 * @Created 2017/8/17
 * @Email xlwenhao1858@sina.com
 */


public class Padapter_Infor extends FragmentStatePagerAdapter {
    public Padapter_Infor(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        if(position==0){
           return Fragment_infor.newInstance();
        }else if(position==1){
            return VideoFragment.newInstance();
        }else {
            return HomeFragment.newInstance();

        }
     }

    @Override
    public int getCount() {
        return 3;
    }
}
